Skip to content

Fix DataTable conditional style typing#3792

Open
puneetdixit200 wants to merge 1 commit into
plotly:devfrom
puneetdixit200:fix-datatable-conditional-style-types
Open

Fix DataTable conditional style typing#3792
puneetdixit200 wants to merge 1 commit into
plotly:devfrom
puneetdixit200:fix-datatable-conditional-style-types

Conversation

@puneetdixit200
Copy link
Copy Markdown

Summary:

  • Add a DataTable typing hook for conditional style props so each entry can include CSS style keys.
  • Preserve the generated TypedDict for the conditional if clause.
  • Add regression coverage for all four conditional style props.

Tests:

  • .venv\Scripts\python -m pytest tests\unit\development\test_dash_table_typing.py -q
  • .venv\Scripts\python -m pytest tests\unit\development\test_generate_class.py tests\unit\development\test_metadata_conversions.py -q
  • .venv\Scripts\python -m black --check components\dash-table\dash_prop_typing.py tests\unit\development\test_dash_table_typing.py
  • .venv\Scripts\python -m flake8 components\dash-table\dash_prop_typing.py tests\unit\development\test_dash_table_typing.py
  • git diff --check

Fixes #3342

@puneetdixit200 puneetdixit200 force-pushed the fix-datatable-conditional-style-types branch from 196a1b1 to 1c1068f Compare May 23, 2026 15:05
@puneetdixit200
Copy link
Copy Markdown
Author

Rebased this branch on current dev; no code changes beyond the rebase.

Verified:

  • python3 -m py_compile components/dash-table/dash_prop_typing.py tests/unit/development/test_dash_table_typing.py
  • git diff --check

@sonarqubecloud
Copy link
Copy Markdown

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[BUG] DataTable cell_style_conditional type hint does not include the style itself

1 participant